<table class="layui-table text-center" lay-size="sm">
    <thead>
        <tr>
            <th style="width: 48px">#</th>
            <th>仓库</th>
            <th>区域</th>
            <th>货架编号</th>
            <th>库位</th>
            <th>在货架层数</th>
            <th>最大可放数量</th>
            <th>状态</th>
            <th>是否使用</th>
            <th>备注</th>
            <th>操作</th>
        </tr>
    </thead>
    <tbody>
        {volist name="list" id="item"}
            <tr>
                <td>{$key+1}</td>
                <td>{$item.warehouse.name}</td>
                <td>{$item.shelf.area.name}</td>
                <td class="copy-text">{$item.shelf.code}</td>
                <td class="copy-text">{$item.code}</td>
                <td>{$item.floor?:''}</td>
                <td>{$item.max_qty?:''}</td>
                <td>
                    {php}$status = $item['status'];{/php}
                    <a href="{:url('save',['location_id'=>$item['location_id'], 'status'=>abs(1-$status)])}" class="ajax-get" msg="0" style="font-size: 16px;">
                        {$status?'<i class="fa fa-unlock"></i>':'<i class="fa fa-lock text-red"></i>'}</a>
                </td>
                <td>
                    <span class="{$item.is_used?'text-yellow':'text-muted'}"><i class="fa fa-circle"></i> {$item.is_used?'是':'否'}</span>
                </td>
                <td class="text-left">{$item.remark}</td>
                <td>
                    <a href="{:url('add',['location_id'=>$item['location_id']])}" class="layui-btn layui-btn-xs layui-btn-normal ajax-form" title="货架">编辑</a>
                </td>
            </tr>
        {/volist}
        {empty name="list"}
        <tr>
            <td colspan="12">没有数据</td>
        </tr>
        {/empty}
    </tbody>
</table>
<div class="page">
    {$page|raw}
</div>